﻿using EntityModels.E09.Files;
using IApplicationServices;
using IRepositories;

namespace ApplicationService
{
    public class FileHashService : IFileHashService
    {
        private readonly IFileHashRepository repository;

        public FileHashService(IFileHashRepository repository)
        {
            this.repository = repository;
        }

        public async Task<FileHash> CreateAsync(FileHash fileHash)
        {
            return await repository.CreateAsync(fileHash);

        }

        public async Task<FileHash> FileByHashAsync(string hash)
        {
            return await repository.FindAsync(hash);
        }

    }
}
